//1. 公用样式
require('../../assets/css/index.less');
require('../../assets/css/basic.less');
require('../../assets/fonts/iconfont.css');

//2. 当前页面样式
require('./courgepr.less');

//3. 公用js
let dom=require('../../utils/dom.js');
let local=require('../../utils/local.js');      
let https=require('../../utils/https.js');      

//4. 当前页面的js
// console.log(dom);

dom.ready(function(){
    let id=local.get('courseId');
    https.get('/api/train/courseDetail',{id},function(res){
        if(res.errno==0){
            videoUrl.src='http://47.96.154.185:3701'+res.data.fragments[1].videoUrl;
            imgUrl.src='http://47.96.154.185:3701'+res.data.fragments[1].imgUrl;
        }
    })
    //   点击暂停按钮
    dom.getEle('#btn').addEventListener('click',function(){
      dom.getEle('#mask').style.display='block';
    });

    // 点击继续训练
    dom.getEle('#continue').addEventListener('click',function(){
        dom.getEle('#mask').style.display='none';
    })


      // 点击结束训练
      dom.getEle('#end').addEventListener('click',function(){
       window.location.href='course.html'
    })

    

})

